﻿<local:DocumentBase x:Class="WPFExcelReport.FLTCCRD"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
        xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
       Height="700" Width="1024" 
       Background="White" 
         Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
        <ucd:DD2ColorConverter  x:Key="dd2color"/>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" Height="630" Width="978">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,0,3,21">
            <WrapPanel Width="968" Height="38">
                <Label Content="仓库："    Width="48" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtLO" Width="30" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="99" Text="01"
                         CharacterCasing="Upper" Background="White" MaxLength="2" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="库区(CC为做色卡RD为研发)："    Width="231" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtLB" Width="48" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="1"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" Background="Pink" MaxLength="2" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="操作日期:" Height="26" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label1" VerticalAlignment="Top" Width="89" FontSize="18" />
                <DatePicker Height="29" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DATE" VerticalAlignment="Top" 
                                SelectedDateChanged ="FROM_DATE_SelectedDateChanged" Width="109" />
                <Label Content="-" Height="28" HorizontalAlignment="Left" Margin="10,0,0,0" Name="label2" VerticalAlignment="Top" Width="19" FontSize="18" />
                <DatePicker Height="29" HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_DATE" VerticalAlignment="Top" 
                                SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="109" />
                <Button Height="30" Margin="20,0,0,0"  Name="btnQuery" Width="30" Panel.ZIndex="2"
                        Click="btnQuery_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <Button   Height="33" Margin="20,0,0,0"  Name="btnPrintPreview" Width="30" Click="btnPrintPreview_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/excel_icon.jpg" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            
        </StackPanel>
        <StackPanel Margin="0,37,3,12" Grid.RowSpan="4" Grid.ColumnSpan="2">            
            <WrapPanel Width="972" Height="538">
                <DataGrid CanUserReorderColumns="True" 
                          CanUserResizeRows="True" CanUserSortColumns="True"
                          AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  Width="969"
                  Height="522"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               Grid.ColumnSpan="2" Margin="0,10,0,0" Grid.RowSpan="3" Grid.Row="1" DataContext="{Binding}">
                    <!--	GABLO	GABLB GABBUCHDAT	GABPARTIE	GABLBEHI	GABART	GABVAR	GSHANDLNR	GSGARNBEZ	
                    GABFARBE	GSCBEZ	TYPE	KG	GABBUCHBEN--> 
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=GABLO}" Header="库" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=GABLB}" Header="库区" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=GABBUCHDAT}" Header="操作日期" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=GABPARTIE}" Header="LOT#" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=GABLBEHI}" Header="箱号" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=GABART}" Header="纱线编号" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=GABVAR}" Header="版本" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=GSHANDLNR}" Header="成份" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=GSGARNBEZ}" Header="名称" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=GABFARBE}" Header="色号" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=GSCBEZ}" Header="颜色" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=TYPE}" Header="业务类型" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=KG}" Header="重量" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=GABBUCHBEN}" Header="操作人员" Width="SizeToCells" MinWidth="40" />                        
                    </DataGrid.Columns>
                </DataGrid>
            </WrapPanel>
        </StackPanel>
       
    </Grid>
</local:DocumentBase>
